﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Threading;
using System.Linq;
using System.Windows;
using GoldDigger.ViewModels;
using GalaSoft.MvvmLight.Threading;

namespace GoldDigger
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        static App()
        {
            DispatcherHelper.Initialize();

            var appSplash = new SplashScreen(@"..\Images\SplashScreen.png");
            appSplash.Show(false);
            Thread.Sleep(2000); 

            appSplash.Close(new TimeSpan(1));
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Window mainWindow = new MainWindow();
            mainWindow.DataContext = new MainViewModel();
            mainWindow.Show();
        }
    }
}
